import javax.sound.sampled.*;
import java.io.*;
import java.net.URL;

public class Sound
{
	Clip clip;
   public Sound(String fileName) {
      soundFile = new File(fileName);
   }
   
   public void play() {
      try {
         clip = AudioSystem.getClip();
         clip.open(AudioSystem.getAudioInputStream(soundFile));
         clip.start(); 
      } catch (Exception e) { System.err.println(e.getMessage()); }
   }

   public void stop(){
	   clip.stop();
   }
   private File soundFile;
}

